﻿<Page
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:JasRibbonApplicatie.Classes"
      xmlns:conv="clr-namespace:JasRibbonApplicatie.Converters"
      xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
      xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
      x:Class="JasRibbonApplicatie.Views.BeheerAanvragen.OverzichtAanvragen"
      mc:Ignorable="d" 
      d:DesignHeight="1024" d:DesignWidth="1280"
    x:Name="OverzichtAanvragenPage"
	Title="Overzicht Aanvragen" Unloaded="OverzichtAanvragenPage_Unloaded">
    <Page.Resources>
        <conv:TimeFromMagazijnierIdConverter x:Key="conv" />
        <Style TargetType="{x:Type ComboBoxItem}" x:Key="combostyle">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="OnMouseEnter1">
                                <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="selectedBackground">
                                    <EasingColorKeyFrame KeyTime="0" Value="#00CCCCCC"/>
                                    <EasingColorKeyFrame KeyTime="0:0:0.5" Value="#B2CCCCCC"/>
                                </ColorAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="OnMouseLeave1">
                                <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="selectedBackground">
                                    <EasingColorKeyFrame KeyTime="0" Value="#B2CCCCCC"/>
                                    <EasingColorKeyFrame KeyTime="0:0:0.5" Value="#00CCCCCC"/>
                                </ColorAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>

                        <Grid x:Name="bd">
                            <Grid.ToolTip>
                                <MultiBinding Converter="{StaticResource conv}" Mode="OneWay">
                                    <Binding />
                                    <!-- this mimics your current binding to the datacontext itself -->
                                    <Binding ElementName="afhalenDatePicker"/>
                                </MultiBinding>
                            </Grid.ToolTip>

                            <Rectangle x:Name="MarkedItemBackground" IsHitTestVisible="False" Fill="#B2FF3C3C" />
                            <Rectangle x:Name="selectedBackground" RadiusX="2" RadiusY="2" Opacity="1" Fill="#00CCCCCC"/>
                            <Rectangle x:Name="Background" RadiusX="2" RadiusY="2" Opacity="0" Fill="{TemplateBinding Background}"/>
                            <ContentPresenter x:Name="NormalText"
                                    		  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
											  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
											  Margin="5,1,5,1">
                                <TextElement.Foreground>
                                    <SolidColorBrush x:Name="selectedText" Color="Black"/>
                                </TextElement.Foreground>
                            </ContentPresenter>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="bd">
                                <BeginStoryboard Storyboard="{StaticResource OnMouseEnter1}"/>
                            </EventTrigger>
                            <EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="bd">
                                <BeginStoryboard x:Name="OnMouseLeave1_BeginStoryboard" Storyboard="{StaticResource OnMouseLeave1}"/>
                            </EventTrigger>
                            <DataTrigger Value="{x:Null}">
                                <DataTrigger.Binding>
                                    <MultiBinding Converter="{StaticResource conv}" Mode="OneWay">
                                        <Binding />
                                        <!-- this mimics your current binding to the datacontext itself -->
                                        <Binding ElementName="afhalenDatePicker"/>
                                    </MultiBinding>
                                </DataTrigger.Binding>
                                <Setter TargetName="MarkedItemBackground" Property="Visibility" Value="Hidden" />
                            </DataTrigger>

                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style TargetType="{x:Type ComboBoxItem}" x:Key="combostyle2">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="OnMouseEnter1">
                                <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="selectedBackground">
                                    <EasingColorKeyFrame KeyTime="0" Value="#00CCCCCC"/>
                                    <EasingColorKeyFrame KeyTime="0:0:0.5" Value="#B2CCCCCC"/>
                                </ColorAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="OnMouseLeave1">
                                <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="selectedBackground">
                                    <EasingColorKeyFrame KeyTime="0" Value="#B2CCCCCC"/>
                                    <EasingColorKeyFrame KeyTime="0:0:0.5" Value="#00CCCCCC"/>
                                </ColorAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>

                        <Grid x:Name="bd">

                            <Grid.ToolTip>
                                <MultiBinding Converter="{StaticResource conv}" Mode="OneWay">
                                    <Binding />
                                    <!-- this mimics your current binding to the datacontext itself -->
                                    <Binding ElementName="inleverenDatePicker"/>
                                </MultiBinding>
                            </Grid.ToolTip>

                            <Rectangle x:Name="MarkedItemBackground" IsHitTestVisible="False" Fill="#B2FF3C3C" />
                            <Rectangle x:Name="selectedBackground" RadiusX="2" RadiusY="2" Opacity="1" Fill="#00CCCCCC"/>
                            <Rectangle x:Name="Background" RadiusX="2" RadiusY="2" Opacity="0" Fill="{TemplateBinding Background}"/>
                            <ContentPresenter x:Name="NormalText"
                                    		  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
											  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
											  Margin="5,1,5,1">
                                <TextElement.Foreground>
                                    <SolidColorBrush x:Name="selectedText" Color="Black"/>
                                </TextElement.Foreground>
                            </ContentPresenter>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="bd">
                                <BeginStoryboard Storyboard="{StaticResource OnMouseEnter1}"/>
                            </EventTrigger>
                            <EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="bd">
                                <BeginStoryboard x:Name="OnMouseLeave1_BeginStoryboard" Storyboard="{StaticResource OnMouseLeave1}"/>
                            </EventTrigger>
                            <DataTrigger Value="{x:Null}">
                                <DataTrigger.Binding>
                                    <MultiBinding Converter="{StaticResource conv}" Mode="OneWay">
                                        <Binding />
                                        <!-- this mimics your current binding to the datacontext itself -->
                                        <Binding ElementName="inleverenDatePicker"/>
                                    </MultiBinding>
                                </DataTrigger.Binding>
                                <Setter TargetName="MarkedItemBackground" Property="Visibility" Value="Hidden" />
                            </DataTrigger>

                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="MyDataGridRowStyle" TargetType="{x:Type DataGridRow}">
            <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
            <Setter Property="SnapsToDevicePixels" Value="true"/>
            <Setter Property="Validation.ErrorTemplate" Value="{x:Null}"/>
            <Setter Property="ValidationErrorTemplate">
                <Setter.Value>
                    <ControlTemplate>
                        <TextBlock Foreground="Red" Margin="2,0,0,0" Text="!" VerticalAlignment="Center"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type DataGridRow}">
                        <Border x:Name="DGR_Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True" Background="White">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Normal_AlternatingRow">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="DGR_Border">
                                                <EasingColorKeyFrame KeyTime="0" Value="White"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Unfocused_Editing"/>
                                    <VisualState x:Name="Normal_Editing"/>
                                    <VisualState x:Name="Unfocused_Selected">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="DGR_Border">
                                                <EasingColorKeyFrame KeyTime="0" Value="#FFBBBBFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal_Selected">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="DGR_Border">
                                                <EasingColorKeyFrame KeyTime="0" Value="#FFBBBBFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="DGR_Border">
                                                <EasingColorKeyFrame KeyTime="0" Value="#FFBBBBBB"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver_Unfocused_Editing">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="DGR_Border">
                                                <EasingColorKeyFrame KeyTime="0" Value="#FFBBBBBB"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver_Editing">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="DGR_Border">
                                                <EasingColorKeyFrame KeyTime="0" Value="#FFBBBBBB"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver_Unfocused_Selected">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="DGR_Border">
                                                <EasingColorKeyFrame KeyTime="0" Value="#FFBBBBBB"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver_Selected">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="DGR_Border">
                                                <EasingColorKeyFrame KeyTime="0" Value="#FFBBBBFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="ValidationStates">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition GeneratedDuration="0:0:0.5"/>
                                    </VisualStateGroup.Transitions>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <SelectiveScrollingGrid>
                                <SelectiveScrollingGrid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                </SelectiveScrollingGrid.ColumnDefinitions>
                                <SelectiveScrollingGrid.RowDefinitions>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="Auto"/>
                                </SelectiveScrollingGrid.RowDefinitions>
                                <DataGridCellsPresenter Grid.Column="1" ItemsPanel="{TemplateBinding ItemsPanel}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                <DataGridDetailsPresenter Grid.Column="1" Grid.Row="1" SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Visibility="{TemplateBinding DetailsVisibility}"/>
                                <DataGridRowHeader Grid.RowSpan="2" SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
                            </SelectiveScrollingGrid>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <SolidColorBrush x:Key="{x:Static DataGrid.FocusBorderBrushKey}" Color="#FF000000"/>
        <Style x:Key="MyDataGridCellStyle" TargetType="{x:Type DataGridCell}">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderBrush" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type DataGridCell}">
                        <Border BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="SelectionStates">
                                    <VisualState x:Name="Unselected"/>
                                    <VisualState x:Name="Selected"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Unfocused"/>
                                    <VisualState x:Name="Focused"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="ValidationStates">
                                    <VisualState x:Name="Valid"/>
                                    <VisualState x:Name="InvalidFocused"/>
                                    <VisualState x:Name="InvalidUnfocused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                    <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                </Trigger>
                <Trigger Property="IsKeyboardFocusWithin" Value="True">
                    <Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
                </Trigger>
            </Style.Triggers>
        </Style>
        <conv:StatusToImageConverter x:Key="StatusToImageConverter"/>
    </Page.Resources>

    <Grid Margin="10,10,10,0" x:Name="rootGrid">
    	<VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="VisualStateGroup">
                <VisualStateGroup.Transitions>
                    <VisualTransition GeneratedDuration="0:0:0.5"/>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="AanvraagSelectieState">
    				<Storyboard>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="aanvragenDatagrid">
    						<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
    					</ObjectAnimationUsingKeyFrames>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="BeheerFrame">
    						<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}"/>
    					</ObjectAnimationUsingKeyFrames>
    				</Storyboard>
                </VisualState>
                <VisualState x:Name="BeheerAanvraagState">
    				<Storyboard>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="aanvragenDatagrid">
    						<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}"/>
    					</ObjectAnimationUsingKeyFrames>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="BeheerFrame">
    						<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
    					</ObjectAnimationUsingKeyFrames>
    				</Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" MinHeight="100" />
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <ScrollViewer Grid.Row="0">
            <DataGrid
                  Margin="0,0,0,0"
                  AutoGenerateColumns="false"
                  x:Name="aanvragenDatagrid"
                  DataContext="{Binding}"
                  HeadersVisibility="Column"
                  GridLinesVisibility="None"
                  BorderBrush="#00000000"
                  MouseRightButtonUp="aanvragenDatagrid_MouseRightButtonUp"
                  Background="White"
                  SelectionChanged="aanvragenDatagrid_SelectionChanged"
                  RowStyle="{DynamicResource MyDataGridRowStyle}"
                  CellStyle="{DynamicResource MyDataGridCellStyle}"
                  CanUserAddRows="False"> 
                <DataGrid.Columns>
                    <DataGridTemplateColumn  MinWidth="7" Header="" IsReadOnly="True">
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Image Source="{Binding status,Converter={StaticResource ResourceKey=StatusToImageConverter}}" Stretch="Uniform" Width="7">
                                    <Image.ContextMenu>
                                        <ContextMenu x:Name="statusContextMenu">
                                            <MenuItem Header="Afgekeurd" Click="statusMenuItem_Click">
                                                <MenuItem.Icon>
                                                    <Image Source="/JasRibbonApplicatie;component/Images/statussen/status_01.png" Width="7"/>
                                                </MenuItem.Icon>
                                            </MenuItem>
                                            <MenuItem Header="Nieuw" Click="statusMenuItem_Click">
                                                <MenuItem.Icon>
                                                    <Image Source="/JasRibbonApplicatie;component/Images/statussen/status_02.png" Width="7"/>
                                                </MenuItem.Icon>
                                            </MenuItem>
                                            <MenuItem Header="Eerste goedkeuring" Click="statusMenuItem_Click">
                                                <MenuItem.Icon>
                                                    <Image Source="/JasRibbonApplicatie;component/Images/statussen/status_03.png" Width="7"/>
                                                </MenuItem.Icon>
                                            </MenuItem>
                                            <MenuItem Header="Definietieve goedkeuring" Click="statusMenuItem_Click">
                                                <MenuItem.Icon>
                                                    <Image Source="/JasRibbonApplicatie;component/Images/statussen/status_04.png" Width="7"/>
                                                </MenuItem.Icon>
                                            </MenuItem>
                                            <MenuItem Header="Materiaal buiten" Click="statusMenuItem_Click">
                                                <MenuItem.Icon>
                                                    <Image Source="/JasRibbonApplicatie;component/Images/statussen/status_05.png" Width="7" />
                                                </MenuItem.Icon>
                                            </MenuItem>
                                            <MenuItem Header="Ontlening afgerond" Click="statusMenuItem_Click">
                                                <MenuItem.Icon>
                                                    <Image Source="/JasRibbonApplicatie;component/Images/statussen/status_06.png" Width="7"/>
                                                </MenuItem.Icon>
                                            </MenuItem>
                                        </ContextMenu>
                                    </Image.ContextMenu>
                                </Image>
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
                    <DataGridTextColumn Binding="{Binding aanvraag_id}" Header="ID" IsReadOnly="True"/>
                    <DataGridTextColumn Binding="{Binding gebruiker.NaamVoornaam}" Header="Verantwoordelijke" IsReadOnly="True" />
                    <DataGridTextColumn Binding="{Binding vereniging.vereniging}" Header="Vereniging" IsReadOnly="True" />
                    <DataGridTextColumn Binding="{Binding evenement.naam}" Header="Activiteit" IsReadOnly="True" />
                    <DataGridTextColumn Binding="{Binding evenement.start, StringFormat=dd/MM/yyyy HH:mm}" Header="Begin Evenement" IsReadOnly="True" />
                    <DataGridTextColumn Binding="{Binding evenement.einde, StringFormat=dd/MM/yyyy HH:mm}" Header="Einde Evenement" IsReadOnly="True" />
                    <DataGridTextColumn Binding="{Binding magazijnierAfhaling.gebruiker.NaamVoornaam}" Header="Magazijnier Afhaling" IsReadOnly="True" />
                    <DataGridTextColumn Binding="{Binding geplande_afhaling, StringFormat=dd/MM/yyyy HH:mm}" Header="Datum Afhaling" IsReadOnly="True" />
                    <DataGridTextColumn Binding="{Binding magazijnierInlevering.gebruiker.NaamVoornaam}" Header="Magazijnier Inlevering" IsReadOnly="True" />
                    <DataGridTextColumn Binding="{Binding geplande_inlevering, StringFormat=dd/MM/yyyy HH:mm}" Header="Datum Inlevering" IsReadOnly="True" />
                </DataGrid.Columns>
            </DataGrid>
        </ScrollViewer>
        
        <Grid x:Name="OntleningDetailsWrapPanel" Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <GroupBox Grid.Column="0" Grid.Row="0" Header="Info ontlening" HorizontalAlignment="Left" Margin="9,0,0,0" x:Name="aanvraagInfoGroupBox" VerticalAlignment="Top" Width="350">
                <Grid Name="aanvraagdetailsGrid">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="118" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="27"/>
                        <RowDefinition Height="27"/>
                        <RowDefinition Height="27"/>
                        <RowDefinition Height="27"/>
                        <RowDefinition Height="27"/>
                    </Grid.RowDefinitions>
                    <Label Grid.Row="0" Grid.Column="0" Margin="3" x:Name="aanvraagidLabel"             Content="Aanvraag ID: " Padding="0" VerticalAlignment="Center" />
                    <Label Grid.Row="0" Grid.Column="1" Margin="3" x:Name="valaanvraagidLabel"          Content="{Binding Path=aanvraag_id, Mode=OneWay}" Padding="0" VerticalAlignment="Center" />
                    <Label Grid.Row="1" Grid.Column="0" Margin="3" x:Name="evenementLabel"              Content="Evenement :" Padding="0" VerticalAlignment="Center" />
                    <Label Grid.Row="1" Grid.Column="1" Margin="3" x:Name="valevenementLabel"           Content="{Binding Path=evenement.naam, Mode=OneWay}" Padding="0" VerticalAlignment="Center" />
                    <Label Grid.Row="2" Grid.Column="0" Margin="3" x:Name="evenementplaatsLabel"        Content="Plaats" Padding="0" VerticalAlignment="Center" />
                    <Label Grid.Row="2" Grid.Column="1" Margin="3" x:Name="valevenementplaatsLabel"     Content="{Binding Path=evenement.plaats, Mode=OneWay}" Padding="0" VerticalAlignment="Center" />
                    <Label Grid.Row="3" Grid.Column="0" Margin="3" x:Name="evenementstartLabel"         Content="Start: " Padding="0" VerticalAlignment="Center" />
                    <Label Grid.Row="3" Grid.Column="1" Margin="3" x:Name="valevenementstartLabel"      Content="{Binding Path=evenement.start, Mode=OneWay}" Padding="0" VerticalAlignment="Center" />
                    <Label Grid.Row="4" Grid.Column="0" Margin="3" x:Name="evenementeindLabel"          Content="Einde :" Padding="0" VerticalAlignment="Center" />
                    <Label Grid.Row="4" Grid.Column="1" Margin="3" x:Name="valevenementeindLabel"       Content="{Binding Path=evenement.einde, Mode=OneWay}" Padding="0" VerticalAlignment="Center" />
                </Grid>
            </GroupBox>
            <GroupBox Grid.Column="0" Grid.Row="1"  Header="Info ontlener" HorizontalAlignment="Left" Margin="9,0,0,0" x:Name="ontlenerInfoGroupBox" VerticalAlignment="Top" Width="350">
                <Grid Name="aanvragerdetailsGrid">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="118" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="27"/>
                        <RowDefinition Height="20"/>
                        <RowDefinition Height="20"/>
                        <RowDefinition Height="20"/>
                        <RowDefinition Height="27"/>
                        <RowDefinition Height="27"/>
                    </Grid.RowDefinitions>
                    <Label Grid.Row="0" Grid.Column="0" Margin="3" x:Name="verenigingLabel"             Content="Vereniging: " Padding="0" VerticalAlignment="Center" />
                    <Label Grid.Row="0" Grid.Column="1" Margin="3" x:Name="valverenigingLabel"          Content="{Binding Path=vereniging.vereniging, Mode=OneWay}" VerticalAlignment="Center" Padding="0" />
                    <Label Grid.Row="1" Grid.Column="0" Margin="3" x:Name="verantwoordelijkeLabel"      Content="Verantwoordelijke :" Padding="0" VerticalAlignment="Center" />
                    <Label Grid.Row="1" Grid.Column="1" Margin="3" x:Name="valverantwoordelijkeLabel"   Content="{Binding Path=gebruiker.NaamVoornaam, Mode=OneWay}" VerticalAlignment="Center" Padding="0" />
                    <Label Grid.Row="2" Grid.Column="1" Margin="3" x:Name="valstraatnrLabel"            Content="{Binding Path=gebruiker.StraatNr, Mode=OneWay}" VerticalAlignment="Center" Padding="0" />
                    <Label Grid.Row="3" Grid.Column="1" Margin="3,0" x:Name="valgemeenteLabelLabel"     Content="{Binding Path=gebruiker.PostcodeGemeente, Mode=OneWay}" VerticalAlignment="Center" Padding="0" />
                    <Label Grid.Row="4" Grid.Column="0" Margin="3" x:Name="emailLabel"                  Content="Email :" Padding="0" VerticalAlignment="Center" />
                    <Label Grid.Row="4" Grid.Column="1" Margin="3" x:Name="valemailLabel"               Content="{Binding Path=gebruiker.email, Mode=OneWay}" VerticalAlignment="Center" Padding="0" />
                    <Label Grid.Row="5" Grid.Column="0" Margin="3" x:Name="gsmLabel"                    Content="GSM :" Padding="0" VerticalAlignment="Center" />
                    <Label Grid.Row="5" Grid.Column="1" Margin="3" x:Name="valgsmLabel"                 Content="{Binding Path=gebruiker.gsm, Mode=OneWay}" VerticalAlignment="Center" Padding="0" />
                </Grid>
            </GroupBox>
            <GroupBox Grid.Column="1" Grid.Row="0" Grid.RowSpan="2"  Header="Opmerkingen" HorizontalAlignment="Left" Margin="9,0,0,0" x:Name="opmerkingenGroupBox" VerticalAlignment="Stretch" Width="350">
                <ScrollViewer VerticalAlignment="Stretch">
                    <Grid Name="opmerkingenGrid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="118" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <Label   Grid.Row="0" Grid.Column="0" Margin="3" x:Name="opmaanvragerLabel"     Content="Aanvrager: " Padding="0" VerticalAlignment="Top" />
                        <TextBlock Grid.Row="0" Grid.Column="1" Margin="3" x:Name="valopmaanvragerLabel" Text="{Binding Path=opmerking_aanvrager, Mode=OneWay}" VerticalAlignment="Top" Padding="0" TextWrapping="Wrap" />
                        <Label   Grid.Row="1" Grid.Column="0" Margin="3" x:Name="opmbeheerderLabel"     Content="Beheerder :" Padding="0" VerticalAlignment="Top" />
                        <TextBox Grid.Row="1" Grid.Column="1" Margin="3" x:Name="valopmbeheerderLabel"  Text="{Binding Path=opmerking_beheerder, Mode=TwoWay}" VerticalAlignment="Top" Padding="0" TextWrapping="Wrap" AcceptsReturn="True" />
                        <Label   Grid.Row="2" Grid.Column="0" Margin="3" x:Name="opmafhalingLabel"      Content="Afhaling :" Padding="0" VerticalAlignment="Top" />
                        <TextBox Grid.Row="2" Grid.Column="1" Margin="3" x:Name="valopmafhalingLabel"   Text="{Binding Path=opmerking_afhaling, Mode=TwoWay}" VerticalAlignment="Top" Padding="0" TextWrapping="Wrap" AcceptsTab="False" AcceptsReturn="True" />
                        <Label   Grid.Row="3" Grid.Column="0" Margin="3" x:Name="opminleveringLabel"    Content="Inlevering :" Padding="0" VerticalAlignment="Top" />
                        <TextBox Grid.Row="3" Grid.Column="1" Margin="3" x:Name="valopminleveringLabel" Text="{Binding Path=opmerking_inlevering, Mode=TwoWay}" VerticalAlignment="Top" Padding="0" TextWrapping="Wrap" AcceptsReturn="True" />
                    </Grid>
                </ScrollViewer>
            </GroupBox>
            <Grid Grid.Column="2" Grid.Row="0" >
                <GroupBox Header="Afhalen" HorizontalAlignment="Left" Margin="9,0,0,0" x:Name="afhalenGroupBox" VerticalAlignment="Top" Width="350">
                    <Grid>
                        <Label Content="Magazijnier: " HorizontalAlignment="Left" Margin="6,6,0,0" x:Name="magazijnier1Label" Width="120" Height="26" VerticalAlignment="Top" />
                        <Label Content="Tijdstip: " Margin="6,31,0,0" x:Name="tijdstip1Label" Height="26" VerticalAlignment="Top" HorizontalAlignment="Left" Width="120" />
                        <ComboBox Height="23" HorizontalAlignment="Left" Margin="121,6,0,0" x:Name="afhalenMagazijnierComboBox" VerticalAlignment="Top" Width="211" DisplayMemberPath="gebruiker.NaamVoornaam" SelectionChanged="afhalenMagazijnierComboBox_SelectionChanged" ItemContainerStyle="{DynamicResource ResourceKey=combostyle}">
                            <ComboBox.Resources>
                                <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Gray" />
                            </ComboBox.Resources>
                        </ComboBox>
                        <DatePicker Height="25" HorizontalAlignment="Left" Margin="121,32,0,0" x:Name="afhalenDatePicker" VerticalAlignment="Top" Width="132" SelectedDateChanged="afhalenDatePicker_SelectedDateChanged" />
                        <ComboBox Height="23" x:Name="afhalenTijdComboBox" Width="73" Margin="259,33,6,1" SelectionChanged="afhalenTijdComboBox_SelectionChanged" />
                    </Grid>
                </GroupBox>
                <GroupBox Header="Inleveren" HorizontalAlignment="Left" Margin="9,86,0,0" x:Name="inleverenGroupBox" VerticalAlignment="Top" Width="350">
                    <Grid>
                        <Label Content="Magazijnier: " HorizontalAlignment="Left" Margin="6,6,0,0" x:Name="magazijnier2Label" Width="120" Height="26" VerticalAlignment="Top" />
                        <Label Content="Tijdstip: " HorizontalAlignment="Left" Margin="6,31,0,0" x:Name="tijdstip2Label" Width="120" Height="26" VerticalAlignment="Top" />
                        <ComboBox Height="23" HorizontalAlignment="Left" Margin="121,6,0,0" x:Name="inleverenMagazijnierComboBox"  VerticalAlignment="Top" Width="211" DisplayMemberPath="gebruiker.NaamVoornaam" SelectionChanged="inleverenMagazijnierComboBox_SelectionChanged"  ItemContainerStyle="{DynamicResource ResourceKey=combostyle2}">
                            <ComboBox.Resources>
                                <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Gray" />
                            </ComboBox.Resources>
                        </ComboBox>
                        <DatePicker Height="25" HorizontalAlignment="Left" Margin="121,32,0,0" x:Name="inleverenDatePicker" VerticalAlignment="Top" Width="132" SelectedDateChanged="inleverenDatePicker_SelectedDateChanged" />
                        <ComboBox Height="23" Margin="259,32,6,0" x:Name="inleverenTijdComboBox" Width="73" SelectionChanged="inleverenTijdComboBox_SelectionChanged" VerticalAlignment="Top" />
                    </Grid>
                </GroupBox>
            </Grid>
            <Image Grid.Column="2" Grid.Row="1" Source="/JasRibbonApplicatie;component/Images/logo_128.png" Stretch="None" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="20" />
        </Grid>
    </Grid>
</Page>
